sound-applet: Fix mute/unmute toggle when clicking volume icon (#13053)#13054
Conversation
…d using the icon.
|
I’ve noticed that while this fix works in most cases, there are rare situations where clicking the sound icon doesn’t unmute as expected. I’m still trying to identify the exact trigger, but wanted to flag it here so reviewers are aware |
mintFix2.trimmed.mp4 |
|
Hi @mtwebster , just wondering if this fix is valid and if there’s any feedback I should take into account. I’d really like to understand if I’m approaching this the right way, so I can improve my future contributions. Thanks! |
|
Hi, this looks ok - it appears the original behavior is due to the fact that you're clicking on the left end of the slider widget. The way the slider popup 'widget' is implemented, any click on that row is fed to the slider itself. And in this case, with the volume all the way down, the muted icon is used. So we're not really muting here, just turning the volume 'off'. Even with your fix, if you're just a tiny bit off that icon, the underlying handler can still get the event (and make the volume 'off' rather than just 'muted') I'm going to fix the implementation for the slider itself, so only clicks on the visible slider part will affect its position. This should make your icon handler more reliable. |
|
One thing to note, actors are reactive by default (you didn't have to explicitly set it - no big deal). |
itself should affect the position. ref: #13054
This PR fixes an issue where clicking the speaker icon in the Cinnamon sound applet popup would only mute audio but not restore/unmute it.
Before: Clicking the icon muted sound, but subsequent clicks had no effect.
After: Clicking the icon now correctly toggles between mute and unmute.
Steps to test
Build and restart Cinnamon (Alt+F2 → r → Enter).
Open the sound applet from the panel.
Click the speaker icon next to the volume slider:
First click → mutes audio.
Second click → unmutes audio.
Related issue
Fixes #13053